﻿using BusinessLayer.WorldArtPrice.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using BusinessLayer.WorldArtPrice.Entities;

namespace BackEnd.Models
{
    public class SearchArtistModel
    {
        public int? Born { get; set; }
        public int? Died { get; set; }
        public int Country { get; set; }

        [Required(ErrorMessage="You must enter a name.")]
        public string KeyWord { get; set; }
        public int PageIndex { get; set; }
        public int PageSize { get; set; }
        public int TotalPage { get {
            if (PageSize <= 0)
                return 0;
            return (int)(TotalRecord / PageSize);
        } }
        public int TotalRecord { get; set; }
        public bool HasPreviousPage
        {
            get { return PageIndex > 1; }
        }
        public bool HasNextPage
        {
            get { return PageIndex < TotalPage; }
        }
        public List<ArtistForAdminModel> ListOfArtist { get; set; }
        public List<Countrys> ListCountry { get; set; }
    }
}